﻿using System.ComponentModel;
using System.Diagnostics.Contracts;
using System.Xml;

namespace NColony.Syndication.Receiver.Contracts
{
    /// <summary>
    /// Syndication reader.
    /// </summary>
    /// <typeparam name="TFeed">The type of the feed.</typeparam>
    [ContractClass(typeof(ISyndicationReaderContract<>))]
    public interface ISyndicationReader<TFeed> : INotifyPropertyChanging, INotifyPropertyChanged
        where TFeed : ISyndicationFeed
    {
        /// <summary>
        /// Gets or sets the syndication feed.
        /// </summary>
        /// <value>The syndication feed.</value>
        ISyndicationFeed Feed { get; }

        /// <summary>
        /// Reads the specified XML reader.
        /// </summary>
        /// <param name="xmlReader">The XML reader.</param>
        void Read(XmlReader xmlReader);
    }
}
